home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96b.txt / 000006_icon-group-sender _Mon Sep 30 14:23:10 1996.msg < prev    next >
Internet Message Format  |  1997-01-02  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 1 Oct 1996 08:22:18 MST
  2. Date: Mon, 30 Sep 1996 14:23:10 -0700
  3. From: Gregg Townsend <gmt>
  4. Message-Id: <9609302123.AA32391@hawk.CS.Arizona.EDU>
  5. To: jeffery@ringer.cs.utsa.edu, rjhare@ed.ac.uk
  6. Subject: Re: Copying of irregular images
  7. Cc: icon-group@cs.arizona.edu
  8. Errors-To: icon-group-errors@cs.arizona.edu
  9.  
  10.     From: Clinton Jeffery <jeffery@segfault.cs.utsa.edu>
  11.  
  12.     ...you might have to do a little bit of work
  13.     to turn your drawn window into an image string, and then tweak that image
  14.     string to change all pixels drawn in a certain color into the transparent
  15.     color....
  16.  
  17. That should work, although it will be orders of magnitude slower than using
  18. CopyArea().
  19.  
  20. Call Capture() to get a window portion as a string; call imsmap() to change
  21. pixels of one color to a transparent marker ("~" or "\377") used by
  22. DrawImage(); then call DrawImage() to write the pixels back.
  23. (Capture() and imsmap() are in the library; link graphics, link imscolor.)
  24.  
  25. You'll need to be sure that the original "transparent" color remains
  26. distinct when mapped to a palette by Capture().
  27.  
  28.    Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W
  29.    Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077
  30.  
  31.